﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using baseSet.importExport;
using dhSystemBLL.orderData;

namespace dhsystem.produceForm.picking
{
    public partial class Frmgetorder : Form
    {
        public string pname { get; set; }
        string field;
        orderMasterBLL orderMaster = new orderMasterBLL();
        orderDetailBLL orderDetail = new orderDetailBLL();
        public Frmgetorder( string _field)
        {
            InitializeComponent();
            field = _field;
        }

        private void Frmgetorder_Load(object sender, EventArgs e)
        {
            bindingSourceselect.DataSource = orderDetail .getorderDetailAll ();
           // bindingSourceselect.DataSource = orderMaster.getorderMasterAllByorderStatus("审核");
            dGridslect.DataSource = bindingSourceselect;
            DcolumnSet.colSet(moduleInfo.orderDetail , dGridslect);
            toolStripStatusLabel1.Text = "数据总条数:" + dGridslect.RowCount.ToString() + "条";
        }

        private void buttonQuery_Click(object sender, EventArgs e)
        {
            dataQuery();
        }
        //查询语句
        private void dataQuery()
        {
           
        }

        private void dGridslect_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                pname = dGridslect.CurrentRow.Cells[field].Value.ToString();
                this.DialogResult = DialogResult.Yes;
            }
            catch (Exception)
            {
                MessageBox.Show("选择正确的名称");
            }
        }
    }
}
